<?php use_javascript('controller/home/listOrders.js') ?>
<h2>Products List</h2>
<table class="gradient-style" summary="Meeting Results">
    <thead>
        <tr>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Country</th>
            <th>City</th>
            <th>State</th>
            <th>Address</th>
            <th>zip_code</th>
            <th>Email</th>
            <th>Phone</th>
            <th>Date</th>
            <th>Show Details</th>
        </tr>
    </thead>
    <tbody>
        <?php $orders = $pager->getResults() ?>
        <?php foreach ($orders as $order): ?>
            <tr>
                <td><?php echo $order->getFirstName() ?></td>
                <td><?php echo $order->getLastName() ?></td>
                <td><?php echo $order->getCountry() ?></td>
                <td><?php echo $order->getCity() ?></td>
                <td><?php echo $order->getState() ?></td>
                <td><?php echo $order->getAddress() ?></td>
                <td><?php echo $order->getZipCode() ?></td>
                <td><?php echo $order->getEmail() ?></td>
                <td><?php echo $order->getPhone() ?></td>
                <td><?php echo $order->getCreatedAt() ?></td>
                <td><a class="showDetails" href="<?php echo url_for('ShowOrderDetails', array('oid' => $order->getId())) ?>">show details</a></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
    <tfoot>
        <tr>
            <td colspan="11">Report for the required products</td>
        </tr>
        <tr>
            <td colspan="11">
                <?php include_partial('global/pager', array('pager'     => $pager, 'routeName' => 'ListOrders')) ?>
            </td>
        </tr>
    </tfoot>
</table>
<div id="detailsDialog"></div>